<template>
    <el-table border style="width: 100%;" :data="data" :loading="loading">
        <el-table-column align="center" prop="send_time" :label="$i18n.t('OPERATE_TIME')" :min-width="150" fixed="left"></el-table-column>
        <el-table-column align="center" prop="message_template_name" :label="$i18n.t('SMS_TEMPLATE')" :min-width="150"></el-table-column>
        <el-table-column align="center" prop="phone" :label="$i18n.t('PHONE_NUMBER')" :min-width="120"></el-table-column>
        <el-table-column align="center" prop="content" :label="$i18n.t('SMS_CONTENT')" :min-width="350"></el-table-column>
        <el-table-column align="center" prop="operator" :label="$i18n.t('OPERATOR')"></el-table-column>
        <el-table-column align="center" prop="operator_type" :label="$i18n.t('OPERATOR_DEPARTMENT')"></el-table-column>
        <el-table-column align="center" prop="message_id" :label="$i18n.t('MESSAGE_ID')" :min-width="150"></el-table-column>
        <el-table-column align="center" prop="status_text" :label="$i18n.t('STATUS')" :min-width="100" fixed="right">
            <template slot-scope="scope">
                <el-tag size="mini" v-if="scope.row.status === 1" type="primary" effect="dark">{{ scope.row.status_text }}</el-tag>
                <el-tag size="mini" v-if="scope.row.status === 2" type="success" effect="dark">{{ scope.row.status_text }}</el-tag>
                <el-tag size="mini" v-if="scope.row.status === 3" type="danger" effect="dark">{{ scope.row.status_text }}</el-tag>
            </template>
        </el-table-column>
    </el-table>
</template>

<script>
    export default {
        props: ['data', 'loading'],
        name: 'SMSRecordTable'
    }
</script>

<style scoped>

</style>
